package com.group6.controller;

import com.group6.entity.Patient;
import com.group6.service.PatientService;
import com.group6.vo.PatientVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/Patient")
public class PatientController {

    @Resource
    private PatientService patientService;

    @RequestMapping("/PatientAdd")
    public String patientAdd(@RequestBody PatientVo patientVo) {
        return patientService.patientAdd(patientVo);
    }

    @RequestMapping("/PatientList")
    public String patientList() {
        return patientService.patientList();
    }

    @RequestMapping("/PatientDelete")
    public String patientDelete(@RequestBody Patient patient) {
        return patientService.patientDelete(patient);
    }

    @RequestMapping("/PatientUpdate")
    public String patientUpdate(@RequestBody Patient patient) {
        return patientService.patientUpdate(patient);
    }



}
